/*
 ============================================================================
 Name        : saco.c
 Author      : Jesus Jerez
 Version     : 0.1
 License     : GPL3
 ============================================================================
 */

#include <stdio.h>
#include <stdlib.h>
#include <gtk/gtk.h>
#include "saco.h"
#include "sacoui.h"

int main(int argc, char *argv[])
{
	GtkBuilder *builder;
	GError *error = NULL;

	/* widgets */
	Data widgets;

	gtk_init(&argc, &argv);

	builder = gtk_builder_new();
	if(!gtk_builder_add_from_file(builder, glade_file(), &error))
	{
		g_warning("%s", error->message);
		g_free(error);
		return 1;
	}

	widgets.saco_principal = GTK_WIDGET(gtk_builder_get_object(builder, "saco_principal"));
	widgets.acerca_de = GTK_WIDGET(gtk_builder_get_object(builder, "acerca_de"));

	gtk_builder_connect_signals(builder, &widgets);
	g_object_unref(G_OBJECT(builder));
	gtk_widget_show(widgets.saco_principal);
	gtk_main();

	return EXIT_SUCCESS;
}
